clc
fid = fopen('6414.stat');
C1 = textscan(fid, '%u64\t%f\t%u');
fclose(fid);

fid = fopen('6415.stat');
C2 = textscan(fid, '%u64\t%f\t%u');
fclose(fid);

time1 = C1{1};
windowsize1 = C1{2};
bytesreceived1 = C1{3};
time2 = C2{1};
windowsize2 = C2{2};
bytesreceived2 = C2{3};

length(time1)
length(time2)

timerfreq = 10;

figure(1);
plot(time1, windowsize1,'r', time2, windowsize2, 'b');
xlabel('Time (ms)');
ylabel('Congestion Window Size (Packets)');
title('Congestion Window Size vs. Time');

figure(2);
plot(time1, bytesreceived1./timerfreq, 'r', time2, bytesreceived2./timerfreq,'b');
xlabel('Time (ms)');
ylabel('Throughput (b/ms)');
title('Throughput vs. Time');